package com.easytouch.vmhdl.model;

import android.content.SharedPreferences;

import com.easytouch.vmhdl.AppApplication;

/**
 * Created by gulin on 2018/1/5.
 */

public class LoginModel implements ILoginModel {

    public static final String SP_LOGIN = "sp_login";
    public static final String SP_LOGIN_INFO = "sp_login_info";

    @Override
    public String getEncryptLoginInfo() {
        SharedPreferences sp = AppApplication.context.getSharedPreferences(SP_LOGIN, AppApplication.context.MODE_PRIVATE);
        return sp.getString(SP_LOGIN_INFO, "");
    }

    @Override
    public void setEncryptLoginInfo(String pInfo) {
        SharedPreferences sp = AppApplication.context.getSharedPreferences(SP_LOGIN, AppApplication.context.MODE_PRIVATE);
        sp.edit().putString(SP_LOGIN_INFO, pInfo).commit();
    }
}
